/**
 */
package org.mro.grib.model.files.secondEdition.grids.impl;

import java.nio.ByteBuffer;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.mro.grib.model.files.secondEdition.grids.GridDefinitionTemplate330;
import org.mro.grib.model.files.secondEdition.grids.GridsPackage;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Grid Definition Template330</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate330Impl#getNumberOfPointsAlongXAxis <em>Number Of Points Along XAxis</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate330Impl#getNumberOfPointsAlongYAxis <em>Number Of Points Along YAxis</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate330Impl#getLatitudeOfFirstGridPoint <em>Latitude Of First Grid Point</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate330Impl#getLongitudeOfFirstGridPoint <em>Longitude Of First Grid Point</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate330Impl#getResolutionAndComponentFlags <em>Resolution And Component Flags</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate330Impl#getLatitudeWhereDxAndDyAreSpecified <em>Latitude Where Dx And Dy Are Specified</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate330Impl#getLongitudeOfMeridianParallelToYAxis <em>Longitude Of Meridian Parallel To YAxis</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate330Impl#getXDirectionGridLength <em>XDirection Grid Length</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate330Impl#getYDirectionGridLength <em>YDirection Grid Length</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate330Impl#getProjectionCentreFlag <em>Projection Centre Flag</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate330Impl#getScanningMode <em>Scanning Mode</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate330Impl#getLatin1 <em>Latin1</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate330Impl#getLatin2 <em>Latin2</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate330Impl#getLatitudeOfSouthernPoleOfProjection <em>Latitude Of Southern Pole Of Projection</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate330Impl#getLongitudeOfSouthernPoleOfProjection <em>Longitude Of Southern Pole Of Projection</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class GridDefinitionTemplate330Impl extends EarthShapeGridDefinitionImpl implements GridDefinitionTemplate330 {
	/**
	 * The default value of the '{@link #getNumberOfPointsAlongXAxis() <em>Number Of Points Along XAxis</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getNumberOfPointsAlongXAxis()
	 * @generated
	 * @ordered
	 */
	protected static final int NUMBER_OF_POINTS_ALONG_XAXIS_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getNumberOfPointsAlongXAxis() <em>Number Of Points Along XAxis</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getNumberOfPointsAlongXAxis()
	 * @generated
	 * @ordered
	 */
	protected int numberOfPointsAlongXAxis = NUMBER_OF_POINTS_ALONG_XAXIS_EDEFAULT;

	/**
	 * The default value of the '{@link #getNumberOfPointsAlongYAxis() <em>Number Of Points Along YAxis</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getNumberOfPointsAlongYAxis()
	 * @generated
	 * @ordered
	 */
	protected static final int NUMBER_OF_POINTS_ALONG_YAXIS_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getNumberOfPointsAlongYAxis() <em>Number Of Points Along YAxis</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getNumberOfPointsAlongYAxis()
	 * @generated
	 * @ordered
	 */
	protected int numberOfPointsAlongYAxis = NUMBER_OF_POINTS_ALONG_YAXIS_EDEFAULT;

	/**
	 * The default value of the '{@link #getLatitudeOfFirstGridPoint() <em>Latitude Of First Grid Point</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLatitudeOfFirstGridPoint()
	 * @generated
	 * @ordered
	 */
	protected static final int LATITUDE_OF_FIRST_GRID_POINT_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getLatitudeOfFirstGridPoint() <em>Latitude Of First Grid Point</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLatitudeOfFirstGridPoint()
	 * @generated
	 * @ordered
	 */
	protected int latitudeOfFirstGridPoint = LATITUDE_OF_FIRST_GRID_POINT_EDEFAULT;

	/**
	 * The default value of the '{@link #getLongitudeOfFirstGridPoint() <em>Longitude Of First Grid Point</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLongitudeOfFirstGridPoint()
	 * @generated
	 * @ordered
	 */
	protected static final int LONGITUDE_OF_FIRST_GRID_POINT_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getLongitudeOfFirstGridPoint() <em>Longitude Of First Grid Point</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLongitudeOfFirstGridPoint()
	 * @generated
	 * @ordered
	 */
	protected int longitudeOfFirstGridPoint = LONGITUDE_OF_FIRST_GRID_POINT_EDEFAULT;

	/**
	 * The default value of the '{@link #getResolutionAndComponentFlags() <em>Resolution And Component Flags</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getResolutionAndComponentFlags()
	 * @generated
	 * @ordered
	 */
	protected static final byte RESOLUTION_AND_COMPONENT_FLAGS_EDEFAULT = 0x00;

	/**
	 * The cached value of the '{@link #getResolutionAndComponentFlags() <em>Resolution And Component Flags</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getResolutionAndComponentFlags()
	 * @generated
	 * @ordered
	 */
	protected byte resolutionAndComponentFlags = RESOLUTION_AND_COMPONENT_FLAGS_EDEFAULT;

	/**
	 * The default value of the '{@link #getLatitudeWhereDxAndDyAreSpecified() <em>Latitude Where Dx And Dy Are Specified</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLatitudeWhereDxAndDyAreSpecified()
	 * @generated
	 * @ordered
	 */
	protected static final int LATITUDE_WHERE_DX_AND_DY_ARE_SPECIFIED_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getLatitudeWhereDxAndDyAreSpecified() <em>Latitude Where Dx And Dy Are Specified</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLatitudeWhereDxAndDyAreSpecified()
	 * @generated
	 * @ordered
	 */
	protected int latitudeWhereDxAndDyAreSpecified = LATITUDE_WHERE_DX_AND_DY_ARE_SPECIFIED_EDEFAULT;

	/**
	 * The default value of the '{@link #getLongitudeOfMeridianParallelToYAxis() <em>Longitude Of Meridian Parallel To YAxis</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLongitudeOfMeridianParallelToYAxis()
	 * @generated
	 * @ordered
	 */
	protected static final int LONGITUDE_OF_MERIDIAN_PARALLEL_TO_YAXIS_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getLongitudeOfMeridianParallelToYAxis() <em>Longitude Of Meridian Parallel To YAxis</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLongitudeOfMeridianParallelToYAxis()
	 * @generated
	 * @ordered
	 */
	protected int longitudeOfMeridianParallelToYAxis = LONGITUDE_OF_MERIDIAN_PARALLEL_TO_YAXIS_EDEFAULT;

	/**
	 * The default value of the '{@link #getXDirectionGridLength() <em>XDirection Grid Length</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getXDirectionGridLength()
	 * @generated
	 * @ordered
	 */
	protected static final int XDIRECTION_GRID_LENGTH_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getXDirectionGridLength() <em>XDirection Grid Length</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getXDirectionGridLength()
	 * @generated
	 * @ordered
	 */
	protected int xDirectionGridLength = XDIRECTION_GRID_LENGTH_EDEFAULT;

	/**
	 * The default value of the '{@link #getYDirectionGridLength() <em>YDirection Grid Length</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getYDirectionGridLength()
	 * @generated
	 * @ordered
	 */
	protected static final int YDIRECTION_GRID_LENGTH_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getYDirectionGridLength() <em>YDirection Grid Length</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getYDirectionGridLength()
	 * @generated
	 * @ordered
	 */
	protected int yDirectionGridLength = YDIRECTION_GRID_LENGTH_EDEFAULT;

	/**
	 * The default value of the '{@link #getProjectionCentreFlag() <em>Projection Centre Flag</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getProjectionCentreFlag()
	 * @generated
	 * @ordered
	 */
	protected static final byte PROJECTION_CENTRE_FLAG_EDEFAULT = 0x00;

	/**
	 * The cached value of the '{@link #getProjectionCentreFlag() <em>Projection Centre Flag</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getProjectionCentreFlag()
	 * @generated
	 * @ordered
	 */
	protected byte projectionCentreFlag = PROJECTION_CENTRE_FLAG_EDEFAULT;

	/**
	 * The default value of the '{@link #getScanningMode() <em>Scanning Mode</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getScanningMode()
	 * @generated
	 * @ordered
	 */
	protected static final byte SCANNING_MODE_EDEFAULT = 0x00;

	/**
	 * The cached value of the '{@link #getScanningMode() <em>Scanning Mode</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getScanningMode()
	 * @generated
	 * @ordered
	 */
	protected byte scanningMode = SCANNING_MODE_EDEFAULT;

	/**
	 * The default value of the '{@link #getLatin1() <em>Latin1</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLatin1()
	 * @generated
	 * @ordered
	 */
	protected static final int LATIN1_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getLatin1() <em>Latin1</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLatin1()
	 * @generated
	 * @ordered
	 */
	protected int latin1 = LATIN1_EDEFAULT;

	/**
	 * The default value of the '{@link #getLatin2() <em>Latin2</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLatin2()
	 * @generated
	 * @ordered
	 */
	protected static final int LATIN2_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getLatin2() <em>Latin2</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLatin2()
	 * @generated
	 * @ordered
	 */
	protected int latin2 = LATIN2_EDEFAULT;

	/**
	 * The default value of the '{@link #getLatitudeOfSouthernPoleOfProjection() <em>Latitude Of Southern Pole Of Projection</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLatitudeOfSouthernPoleOfProjection()
	 * @generated
	 * @ordered
	 */
	protected static final int LATITUDE_OF_SOUTHERN_POLE_OF_PROJECTION_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getLatitudeOfSouthernPoleOfProjection() <em>Latitude Of Southern Pole Of Projection</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLatitudeOfSouthernPoleOfProjection()
	 * @generated
	 * @ordered
	 */
	protected int latitudeOfSouthernPoleOfProjection = LATITUDE_OF_SOUTHERN_POLE_OF_PROJECTION_EDEFAULT;

	/**
	 * The default value of the '{@link #getLongitudeOfSouthernPoleOfProjection() <em>Longitude Of Southern Pole Of Projection</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLongitudeOfSouthernPoleOfProjection()
	 * @generated
	 * @ordered
	 */
	protected static final int LONGITUDE_OF_SOUTHERN_POLE_OF_PROJECTION_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getLongitudeOfSouthernPoleOfProjection() <em>Longitude Of Southern Pole Of Projection</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLongitudeOfSouthernPoleOfProjection()
	 * @generated
	 * @ordered
	 */
	protected int longitudeOfSouthernPoleOfProjection = LONGITUDE_OF_SOUTHERN_POLE_OF_PROJECTION_EDEFAULT;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected GridDefinitionTemplate330Impl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return GridsPackage.Literals.GRID_DEFINITION_TEMPLATE330;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getNumberOfPointsAlongXAxis() {
		return numberOfPointsAlongXAxis;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setNumberOfPointsAlongXAxis(int newNumberOfPointsAlongXAxis) {
		int oldNumberOfPointsAlongXAxis = numberOfPointsAlongXAxis;
		numberOfPointsAlongXAxis = newNumberOfPointsAlongXAxis;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE330__NUMBER_OF_POINTS_ALONG_XAXIS, oldNumberOfPointsAlongXAxis, numberOfPointsAlongXAxis));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getNumberOfPointsAlongYAxis() {
		return numberOfPointsAlongYAxis;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setNumberOfPointsAlongYAxis(int newNumberOfPointsAlongYAxis) {
		int oldNumberOfPointsAlongYAxis = numberOfPointsAlongYAxis;
		numberOfPointsAlongYAxis = newNumberOfPointsAlongYAxis;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE330__NUMBER_OF_POINTS_ALONG_YAXIS, oldNumberOfPointsAlongYAxis, numberOfPointsAlongYAxis));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getLatitudeOfFirstGridPoint() {
		return latitudeOfFirstGridPoint;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setLatitudeOfFirstGridPoint(int newLatitudeOfFirstGridPoint) {
		int oldLatitudeOfFirstGridPoint = latitudeOfFirstGridPoint;
		latitudeOfFirstGridPoint = newLatitudeOfFirstGridPoint;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE330__LATITUDE_OF_FIRST_GRID_POINT, oldLatitudeOfFirstGridPoint, latitudeOfFirstGridPoint));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getLongitudeOfFirstGridPoint() {
		return longitudeOfFirstGridPoint;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setLongitudeOfFirstGridPoint(int newLongitudeOfFirstGridPoint) {
		int oldLongitudeOfFirstGridPoint = longitudeOfFirstGridPoint;
		longitudeOfFirstGridPoint = newLongitudeOfFirstGridPoint;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE330__LONGITUDE_OF_FIRST_GRID_POINT, oldLongitudeOfFirstGridPoint, longitudeOfFirstGridPoint));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public byte getResolutionAndComponentFlags() {
		return resolutionAndComponentFlags;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setResolutionAndComponentFlags(byte newResolutionAndComponentFlags) {
		byte oldResolutionAndComponentFlags = resolutionAndComponentFlags;
		resolutionAndComponentFlags = newResolutionAndComponentFlags;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE330__RESOLUTION_AND_COMPONENT_FLAGS, oldResolutionAndComponentFlags, resolutionAndComponentFlags));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getLatitudeWhereDxAndDyAreSpecified() {
		return latitudeWhereDxAndDyAreSpecified;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setLatitudeWhereDxAndDyAreSpecified(int newLatitudeWhereDxAndDyAreSpecified) {
		int oldLatitudeWhereDxAndDyAreSpecified = latitudeWhereDxAndDyAreSpecified;
		latitudeWhereDxAndDyAreSpecified = newLatitudeWhereDxAndDyAreSpecified;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE330__LATITUDE_WHERE_DX_AND_DY_ARE_SPECIFIED, oldLatitudeWhereDxAndDyAreSpecified, latitudeWhereDxAndDyAreSpecified));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getLongitudeOfMeridianParallelToYAxis() {
		return longitudeOfMeridianParallelToYAxis;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setLongitudeOfMeridianParallelToYAxis(int newLongitudeOfMeridianParallelToYAxis) {
		int oldLongitudeOfMeridianParallelToYAxis = longitudeOfMeridianParallelToYAxis;
		longitudeOfMeridianParallelToYAxis = newLongitudeOfMeridianParallelToYAxis;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE330__LONGITUDE_OF_MERIDIAN_PARALLEL_TO_YAXIS, oldLongitudeOfMeridianParallelToYAxis, longitudeOfMeridianParallelToYAxis));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getXDirectionGridLength() {
		return xDirectionGridLength;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setXDirectionGridLength(int newXDirectionGridLength) {
		int oldXDirectionGridLength = xDirectionGridLength;
		xDirectionGridLength = newXDirectionGridLength;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE330__XDIRECTION_GRID_LENGTH, oldXDirectionGridLength, xDirectionGridLength));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getYDirectionGridLength() {
		return yDirectionGridLength;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setYDirectionGridLength(int newYDirectionGridLength) {
		int oldYDirectionGridLength = yDirectionGridLength;
		yDirectionGridLength = newYDirectionGridLength;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE330__YDIRECTION_GRID_LENGTH, oldYDirectionGridLength, yDirectionGridLength));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public byte getProjectionCentreFlag() {
		return projectionCentreFlag;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setProjectionCentreFlag(byte newProjectionCentreFlag) {
		byte oldProjectionCentreFlag = projectionCentreFlag;
		projectionCentreFlag = newProjectionCentreFlag;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE330__PROJECTION_CENTRE_FLAG, oldProjectionCentreFlag, projectionCentreFlag));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public byte getScanningMode() {
		return scanningMode;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setScanningMode(byte newScanningMode) {
		byte oldScanningMode = scanningMode;
		scanningMode = newScanningMode;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE330__SCANNING_MODE, oldScanningMode, scanningMode));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getLatin1() {
		return latin1;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setLatin1(int newLatin1) {
		int oldLatin1 = latin1;
		latin1 = newLatin1;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE330__LATIN1, oldLatin1, latin1));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getLatin2() {
		return latin2;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setLatin2(int newLatin2) {
		int oldLatin2 = latin2;
		latin2 = newLatin2;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE330__LATIN2, oldLatin2, latin2));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getLatitudeOfSouthernPoleOfProjection() {
		return latitudeOfSouthernPoleOfProjection;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setLatitudeOfSouthernPoleOfProjection(int newLatitudeOfSouthernPoleOfProjection) {
		int oldLatitudeOfSouthernPoleOfProjection = latitudeOfSouthernPoleOfProjection;
		latitudeOfSouthernPoleOfProjection = newLatitudeOfSouthernPoleOfProjection;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE330__LATITUDE_OF_SOUTHERN_POLE_OF_PROJECTION, oldLatitudeOfSouthernPoleOfProjection, latitudeOfSouthernPoleOfProjection));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getLongitudeOfSouthernPoleOfProjection() {
		return longitudeOfSouthernPoleOfProjection;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setLongitudeOfSouthernPoleOfProjection(int newLongitudeOfSouthernPoleOfProjection) {
		int oldLongitudeOfSouthernPoleOfProjection = longitudeOfSouthernPoleOfProjection;
		longitudeOfSouthernPoleOfProjection = newLongitudeOfSouthernPoleOfProjection;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE330__LONGITUDE_OF_SOUTHERN_POLE_OF_PROJECTION, oldLongitudeOfSouthernPoleOfProjection, longitudeOfSouthernPoleOfProjection));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__NUMBER_OF_POINTS_ALONG_XAXIS:
				return getNumberOfPointsAlongXAxis();
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__NUMBER_OF_POINTS_ALONG_YAXIS:
				return getNumberOfPointsAlongYAxis();
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LATITUDE_OF_FIRST_GRID_POINT:
				return getLatitudeOfFirstGridPoint();
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LONGITUDE_OF_FIRST_GRID_POINT:
				return getLongitudeOfFirstGridPoint();
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__RESOLUTION_AND_COMPONENT_FLAGS:
				return getResolutionAndComponentFlags();
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LATITUDE_WHERE_DX_AND_DY_ARE_SPECIFIED:
				return getLatitudeWhereDxAndDyAreSpecified();
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LONGITUDE_OF_MERIDIAN_PARALLEL_TO_YAXIS:
				return getLongitudeOfMeridianParallelToYAxis();
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__XDIRECTION_GRID_LENGTH:
				return getXDirectionGridLength();
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__YDIRECTION_GRID_LENGTH:
				return getYDirectionGridLength();
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__PROJECTION_CENTRE_FLAG:
				return getProjectionCentreFlag();
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__SCANNING_MODE:
				return getScanningMode();
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LATIN1:
				return getLatin1();
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LATIN2:
				return getLatin2();
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LATITUDE_OF_SOUTHERN_POLE_OF_PROJECTION:
				return getLatitudeOfSouthernPoleOfProjection();
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LONGITUDE_OF_SOUTHERN_POLE_OF_PROJECTION:
				return getLongitudeOfSouthernPoleOfProjection();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__NUMBER_OF_POINTS_ALONG_XAXIS:
				setNumberOfPointsAlongXAxis((Integer)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__NUMBER_OF_POINTS_ALONG_YAXIS:
				setNumberOfPointsAlongYAxis((Integer)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LATITUDE_OF_FIRST_GRID_POINT:
				setLatitudeOfFirstGridPoint((Integer)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LONGITUDE_OF_FIRST_GRID_POINT:
				setLongitudeOfFirstGridPoint((Integer)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__RESOLUTION_AND_COMPONENT_FLAGS:
				setResolutionAndComponentFlags((Byte)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LATITUDE_WHERE_DX_AND_DY_ARE_SPECIFIED:
				setLatitudeWhereDxAndDyAreSpecified((Integer)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LONGITUDE_OF_MERIDIAN_PARALLEL_TO_YAXIS:
				setLongitudeOfMeridianParallelToYAxis((Integer)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__XDIRECTION_GRID_LENGTH:
				setXDirectionGridLength((Integer)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__YDIRECTION_GRID_LENGTH:
				setYDirectionGridLength((Integer)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__PROJECTION_CENTRE_FLAG:
				setProjectionCentreFlag((Byte)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__SCANNING_MODE:
				setScanningMode((Byte)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LATIN1:
				setLatin1((Integer)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LATIN2:
				setLatin2((Integer)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LATITUDE_OF_SOUTHERN_POLE_OF_PROJECTION:
				setLatitudeOfSouthernPoleOfProjection((Integer)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LONGITUDE_OF_SOUTHERN_POLE_OF_PROJECTION:
				setLongitudeOfSouthernPoleOfProjection((Integer)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__NUMBER_OF_POINTS_ALONG_XAXIS:
				setNumberOfPointsAlongXAxis(NUMBER_OF_POINTS_ALONG_XAXIS_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__NUMBER_OF_POINTS_ALONG_YAXIS:
				setNumberOfPointsAlongYAxis(NUMBER_OF_POINTS_ALONG_YAXIS_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LATITUDE_OF_FIRST_GRID_POINT:
				setLatitudeOfFirstGridPoint(LATITUDE_OF_FIRST_GRID_POINT_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LONGITUDE_OF_FIRST_GRID_POINT:
				setLongitudeOfFirstGridPoint(LONGITUDE_OF_FIRST_GRID_POINT_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__RESOLUTION_AND_COMPONENT_FLAGS:
				setResolutionAndComponentFlags(RESOLUTION_AND_COMPONENT_FLAGS_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LATITUDE_WHERE_DX_AND_DY_ARE_SPECIFIED:
				setLatitudeWhereDxAndDyAreSpecified(LATITUDE_WHERE_DX_AND_DY_ARE_SPECIFIED_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LONGITUDE_OF_MERIDIAN_PARALLEL_TO_YAXIS:
				setLongitudeOfMeridianParallelToYAxis(LONGITUDE_OF_MERIDIAN_PARALLEL_TO_YAXIS_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__XDIRECTION_GRID_LENGTH:
				setXDirectionGridLength(XDIRECTION_GRID_LENGTH_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__YDIRECTION_GRID_LENGTH:
				setYDirectionGridLength(YDIRECTION_GRID_LENGTH_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__PROJECTION_CENTRE_FLAG:
				setProjectionCentreFlag(PROJECTION_CENTRE_FLAG_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__SCANNING_MODE:
				setScanningMode(SCANNING_MODE_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LATIN1:
				setLatin1(LATIN1_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LATIN2:
				setLatin2(LATIN2_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LATITUDE_OF_SOUTHERN_POLE_OF_PROJECTION:
				setLatitudeOfSouthernPoleOfProjection(LATITUDE_OF_SOUTHERN_POLE_OF_PROJECTION_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LONGITUDE_OF_SOUTHERN_POLE_OF_PROJECTION:
				setLongitudeOfSouthernPoleOfProjection(LONGITUDE_OF_SOUTHERN_POLE_OF_PROJECTION_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__NUMBER_OF_POINTS_ALONG_XAXIS:
				return numberOfPointsAlongXAxis != NUMBER_OF_POINTS_ALONG_XAXIS_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__NUMBER_OF_POINTS_ALONG_YAXIS:
				return numberOfPointsAlongYAxis != NUMBER_OF_POINTS_ALONG_YAXIS_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LATITUDE_OF_FIRST_GRID_POINT:
				return latitudeOfFirstGridPoint != LATITUDE_OF_FIRST_GRID_POINT_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LONGITUDE_OF_FIRST_GRID_POINT:
				return longitudeOfFirstGridPoint != LONGITUDE_OF_FIRST_GRID_POINT_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__RESOLUTION_AND_COMPONENT_FLAGS:
				return resolutionAndComponentFlags != RESOLUTION_AND_COMPONENT_FLAGS_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LATITUDE_WHERE_DX_AND_DY_ARE_SPECIFIED:
				return latitudeWhereDxAndDyAreSpecified != LATITUDE_WHERE_DX_AND_DY_ARE_SPECIFIED_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LONGITUDE_OF_MERIDIAN_PARALLEL_TO_YAXIS:
				return longitudeOfMeridianParallelToYAxis != LONGITUDE_OF_MERIDIAN_PARALLEL_TO_YAXIS_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__XDIRECTION_GRID_LENGTH:
				return xDirectionGridLength != XDIRECTION_GRID_LENGTH_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__YDIRECTION_GRID_LENGTH:
				return yDirectionGridLength != YDIRECTION_GRID_LENGTH_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__PROJECTION_CENTRE_FLAG:
				return projectionCentreFlag != PROJECTION_CENTRE_FLAG_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__SCANNING_MODE:
				return scanningMode != SCANNING_MODE_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LATIN1:
				return latin1 != LATIN1_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LATIN2:
				return latin2 != LATIN2_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LATITUDE_OF_SOUTHERN_POLE_OF_PROJECTION:
				return latitudeOfSouthernPoleOfProjection != LATITUDE_OF_SOUTHERN_POLE_OF_PROJECTION_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE330__LONGITUDE_OF_SOUTHERN_POLE_OF_PROJECTION:
				return longitudeOfSouthernPoleOfProjection != LONGITUDE_OF_SOUTHERN_POLE_OF_PROJECTION_EDEFAULT;
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (numberOfPointsAlongXAxis: "); //$NON-NLS-1$
		result.append(numberOfPointsAlongXAxis);
		result.append(", numberOfPointsAlongYAxis: "); //$NON-NLS-1$
		result.append(numberOfPointsAlongYAxis);
		result.append(", latitudeOfFirstGridPoint: "); //$NON-NLS-1$
		result.append(latitudeOfFirstGridPoint);
		result.append(", longitudeOfFirstGridPoint: "); //$NON-NLS-1$
		result.append(longitudeOfFirstGridPoint);
		result.append(", resolutionAndComponentFlags: "); //$NON-NLS-1$
		result.append(resolutionAndComponentFlags);
		result.append(", latitudeWhereDxAndDyAreSpecified: "); //$NON-NLS-1$
		result.append(latitudeWhereDxAndDyAreSpecified);
		result.append(", longitudeOfMeridianParallelToYAxis: "); //$NON-NLS-1$
		result.append(longitudeOfMeridianParallelToYAxis);
		result.append(", xDirectionGridLength: "); //$NON-NLS-1$
		result.append(xDirectionGridLength);
		result.append(", yDirectionGridLength: "); //$NON-NLS-1$
		result.append(yDirectionGridLength);
		result.append(", projectionCentreFlag: "); //$NON-NLS-1$
		result.append(projectionCentreFlag);
		result.append(", scanningMode: "); //$NON-NLS-1$
		result.append(scanningMode);
		result.append(", latin1: "); //$NON-NLS-1$
		result.append(latin1);
		result.append(", latin2: "); //$NON-NLS-1$
		result.append(latin2);
		result.append(", latitudeOfSouthernPoleOfProjection: "); //$NON-NLS-1$
		result.append(latitudeOfSouthernPoleOfProjection);
		result.append(", longitudeOfSouthernPoleOfProjection: "); //$NON-NLS-1$
		result.append(longitudeOfSouthernPoleOfProjection);
		result.append(')');
		return result.toString();
	}

	/* (non-Javadoc)
	 * @see org.mro.grib.model.files.secondEdition.grids.impl.EarthShapeGridDefinitionImpl#initialise(java.nio.ByteBuffer)
	 */
	@Override
	public void initialise(ByteBuffer buffer) {
		super.initialise(buffer);
		numberOfPointsAlongXAxis = buffer.getInt();
		numberOfPointsAlongYAxis = buffer.getInt();
		latitudeOfFirstGridPoint = buffer.getInt();
		longitudeOfFirstGridPoint = buffer.getInt();
		resolutionAndComponentFlags = buffer.get();
		latitudeWhereDxAndDyAreSpecified = buffer.getInt();
		longitudeOfMeridianParallelToYAxis = buffer.getInt();
		xDirectionGridLength = buffer.getInt();
		yDirectionGridLength = buffer.getInt();
		projectionCentreFlag = buffer.get();
		scanningMode = buffer.get();
		latin1 = buffer.getInt();
		latin2 = buffer.getInt();
		latitudeOfSouthernPoleOfProjection = buffer.getInt();
		longitudeOfSouthernPoleOfProjection = buffer.getInt();
	}
	
} //GridDefinitionTemplate330Impl
